package vip.zhenzicheng.nettybasic.outread;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;

import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

/**
 * @author zhenzicheng
 * @date 2022-06-07 19:34
 */
public class ServerOutReadHandler extends ChannelOutboundHandlerAdapter {

  private static final Logger LOG = Logger.getLogger(ServerOutReadHandler.class.getSimpleName());

  @Override
  public void read(ChannelHandlerContext ctx) throws Exception {
    LOG.info("请求读取更多的数据，但是我要休息一下");
    TimeUnit.SECONDS.sleep(2);
    super.read(ctx);
  }
}
